package com.sui.bigdata.rtcadmin.constant;


/**
 * @Author: TingWuHuang
 * @Date: 2020/5/6 15:30
 * @description
 */
public class AppConstant {
    public static String ENV = "test";

    public final static String APP_STATUS_RUNNING = "RUNNING";
    public final static String APP_STATUS_ACCEPT = "ACCEPT";
    public final static String APP_STATUS_EDITED = "EDITED";
    public final static String APP_STATUS_CANCELED = "CANCELED";
    public final static String APP_STATUS_FINISH = "FINISH";
    public final static String APP_STATUS_FAILED = "FAILED";
    public final static String APP_STATUS_KILLED = "KILLED";
    public final static String APP_STATUS_DISCONNECT = "DISCONNECT";

    public final static String APP_ACTION_SUBMIT = "submit";
    public final static String APP_ACTION_RESTART = "restart";
    public final static String APP_ACTION_STOP = "stop";
    public final static String APP_ACTION_STATUS = "status";
    public final static Long GET_STATUS_WAITTING_TIME = 500L;
    public final static String SPARK_DEFAULT_MASTER = "yarn";
    public final static String SPARK_CLUSTER_MODEL = "cluster";
    public final static String SPARK_CLIENT_MODEL = "client";
    public final static String SPARK_APPLICATION_BATCH = "0";
    public final static String SPARK_APPLICATION_STREAMING = "1";
    public final static String DEFAULT_QUEUE = "root.default";
    public final static String SPARK_DRIVER_MEMORY_DEFAULT = "1g";
    public final static String SPARK_EXECUTOR_MEMORY_DEFAULT = "1g";
    public final static String SPARK_EXECUTOR_CORES_DEFAULT = "1";

    public final static String SPARK_APP_ARGS_SPLIT = ";";

    public static String WEB_PREFIX = "";
    public final static String WEB_SUFFIX = "/#/overview";

    public final static String METRICS_PREFIX = "APPNAME_";


     public final static String SPARK_METRICS_NAMESPACE = "spark.metrics.namespace";
    /**
     * 用户程序jar包的目录
     */
    public static final String HDFS_MASTER_URL = "hdfs://nameservice1/user/data_team/spark_application/jar/";

     public final static String DRIVER_JAVA_OPTIONS =  "--driver-java-options";
     public final static String DRIVER_MEMORY = "--driver-memory";
     public final static String EXECUTOR_MEMORY = "--executor-memory";

    public final  static String SPARK_EXECUTOR_EXTRAJAVAOPTIONS = "spark.executor.extraJavaOptions";
    // YARN-only options.
     public final static String EXECUTOR_CORES = "--executor-cores";
     public final static String NUM_EXECUTORS = "--num-executors";
     public final static String QUEUE = "--queue";
}
